var Vec2 = (function () {
    function Vec2(source) {
        if (source === void 0) { source = [0]; }
        this.source = [];
        this.source = source;
    }
    Object.defineProperty(Vec2.prototype, "x", {
        get: function () {
            return this.source[0];
        },
        set: function (v) {
            this.source[0] = v;
        },
        enumerable: true,
        configurable: true
    });
    return Vec2;
})();
var Vec2_1 = (function () {
    function Vec2_1() {
        this.x = 0;
    }
    return Vec2_1;
})();
var vec = new Vec2();
var vec1 = new Vec2_1();
var num = 100000000;
console.time('1');
for (var i = 0; i < num; i++) {
    vec.x = num;
    vec.x = vec.x + 1;
}
console.timeEnd('1');
console.time('2');
for (var i = 0; i < num; i++) {
    vec1.x = num;
    vec1.x = vec1.x + 1;
}
console.timeEnd('2');
console.time('1');
for (var i = 0; i < num; i++) {
    vec.x = num;
    vec.x = vec.x + 1;
}
console.timeEnd('1');
console.time('2');
for (var i = 0; i < num; i++) {
    vec1.x = num;
    vec1.x = vec1.x + 1;
}
console.timeEnd('2');
